package com.shuxinxin.test.mapper;
import com.shuxinxin.test.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

//    查询账户
    @Select("select * from user where username = #{username} ")
    public User selectUserById(String username);

//    登录
    @Select("select * from user where username = #{username} and #{password}")
    public User login(String username,String password);
//    注册
    @Insert("insert into user (username,password,nickname) values (#{username},#{password},#{nickname})")
    public int insertUser(String username,String password,String nickname);

    @Select("select * from user where username = #{username} ")
    User selectManage(String username);
}
